<template>
  <div>
    <app-top></app-top>
    <app-header></app-header>
    <router-view></router-view>
    <app-footer></app-footer>
    <stickyNav></stickyNav>
  </div>
</template>

<script>
import appHeader from "@/components/app-header.vue";
import appFooter from "@/components/app-footer.vue";
import appTop from "@/components/app-topnav.vue";
import AppFooter from "../components/app-footer.vue";
import stickyNav from "@/components/app-header-sticky.vue";

import { reactive, toRefs, ref, computed, watch } from "vue";
import { useStore } from "vuex";
import { useRouter } from "vue-router";
export default {
  setup() {
    const router = useRouter();
    const store = useStore();

    // 获取导航
    store.dispatch("category/getList");
    const list = computed(() => {
      store.state.category.list;
    });

    const data = reactive({});
    return { ...toRefs(data), list };
  },
  components: {
    appTop,
    appFooter,
    appHeader,
    stickyNav,
  },
};
</script>
<style scoped lang='less'>
</style>
